import request from "@/api/request.js";
//信息页接口


//获取最大日期
export function getDate(params) {
	return request.get("https://ticket.sxd.cn/api-api/app/clientHelper/appointmentDay", {
		params: params,
		header: {
			'Authorization': params.token,
		}
	});
}

//获取时段
export function get_time_frame(params) {
	return request.post("https://ticket.sxd.cn/api-api/app/clientHelper/getTimeSlotsLimit", params, {
		header: {
			'Authorization': params.token,
			'Content-Type': 'application/json;charset=UTF-8',
			'Accept': '*/*',
			'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
		}
	})
}
//发起订单
export function postCreateOrder(params) {
	return request.post("https://ticket.sxd.cn/api-api/app/clientHelper/v1/createOrder", params, {
		header: {
			'Content-Type': 'application/json;charset=UTF-8',
		}
	})
}
//获取当前时间
export function getTime(params) {
	return request.get("http://47.121.138.102/ajax.php", {
		params: params
	})
}

// 获取验证码
export function get_code(params) {
	return request.post("https://ticket.sxd.cn/api-api/captcha/gen", params, {
		header: {
			'Content-Type': 'application/json;charset=UTF-8',
			'Accept': '*/*',
			'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
		}
	})
}
// 模拟验证码
export function skip_code(params) {
	return request.post("http://47.121.138.102/cssxd/", params, {
		header: {
			'Content-Type': 'application/json;charset=UTF-8',
			'Accept': '*/*',
			'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
		}
	})
}
// 验证验证码
export function verification_code(params) {
	return request.post("https://ticket.sxd.cn/api-api/captcha/check", params, {
		header: {
			'Content-Type': 'application/json;charset=UTF-8',
			'Accept': '*/*',
			'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
		}
	})
}